package com.example.yoga.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liwenkai
 * @since 2021-02-02
 */
@TableName("announcement")
public class Announcement extends Model<Announcement> {

    private static final long serialVersionUID = 1L;

    /**
     * 公告表Id
     */
    @TableId(value = "annoId", type = IdType.AUTO)
    private Integer annoid;

    /**
     * 公告表标题
     */
    @TableField("annoTitle")
    private String annotitle;

    /**
     * 公告内容
     */
    @TableField("annoContent")
    private String annocontent;

    /**
     * 发布日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("publishTime")
    private Date publishtime;

    /**
     * 是否删除
     */
    @TableField("Is_del")
    private Integer isDel;


    public Integer getAnnoid() {
        return annoid;
    }

    public void setAnnoid(Integer annoid) {
        this.annoid = annoid;
    }

    public String getAnnotitle() {
        return annotitle;
    }

    public void setAnnotitle(String annotitle) {
        this.annotitle = annotitle;
    }

    public String getAnnocontent() {
        return annocontent;
    }

    public void setAnnocontent(String annocontent) {
        this.annocontent = annocontent;
    }

    public Date getPublishtime() {
        return publishtime;
    }

    public void setPublishtime(Date publishtime) {
        this.publishtime = publishtime;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    @Override
    protected Serializable pkVal() {
        return this.annoid;
    }

    @Override
    public String toString() {
        return "Announcement{" +
        "annoid=" + annoid +
        ", annotitle=" + annotitle +
        ", annocontent=" + annocontent +
        ", publishtime=" + publishtime +
        ", isDel=" + isDel +
        "}";
    }
}
